package com.jjshop.utils;

import android.content.Context;

import com.jjshop.app.JJShopApplication;

/**
 * Created by Colin on 2015/11/26.
 */
public class GlobalContanst {

    public static final Boolean isOnline = true;

    public static final String JJMAIL_INDEX = "https://yxds.999d.com/v1/index/index";
    public static final String JJMAIL_MYSHOP = "https://yxds.999d.com/m/myshop/index?shop=";
    public static final String JJMAIL_CAR = "https://yxds.999d.com/m/cart/index?shop=";
    public static final String JJMAIL_MYCENTER = "https://yxds.999d.com/m/user/index?shop=";

    //999d USER_BASEURL  //最新
    public static final String BASE_URL = isOnline ? "http://user.999d.com/api/v2" : "http://user.i999d.cn:9800/api/v2";
    //999d USER_BASEURL
    public static final String USER_BASE_URL = isOnline ? "http://user.999d.com/api/v1" : "http://user.i999d.cn:9800/api/v1";
    //999d DOWNLOAD_URL
    public static final String USER_UPLOAD_URL = isOnline ? "http://upload.999d.com/api/v1" : "http://upload.999d.com/api/v1";

    //上传图片的地址
    public static final String UPLOAD_IMAGE_URL = isOnline ? "http://user.999d.com/" : "http://user.i999d.cn/";
    //上传视频的地址
    public static final String UPLOAD_VIDEO_URL = isOnline ? "http://user.999d.com/" : "http://user.i999d.cn:9800/";

    //    999d USER_BASEURL
//    public static String BASE_URL = PreUtils.getString(JJdanceApplication.getInstance().getApplicationContext(), "BASE_URL", "http://user.999d.com/api/v2");
    //999d USER_BASEURL
//    public static String USER_BASE_URL = PreUtils.getString(JJdanceApplication.getInstance().getApplicationContext(), "USER_BASE_URL", "http://user.999d.com/api/v1");

    //File Path
    public static final String DOWNLOAD_PATH = FileUtilLM.getSDFile() + "/jjdance/download/";
    public static final String DOWNLOAD_PATH_MUSIC = FileUtilLM.getSDFile() + "/jjdance/download/music/";
    public static final String DOWNLOAD_PATH_VIDEO = FileUtilLM.getSDFile() + "/jjdance/download/video/";
    public static final String DOWNLOAD_PATH_APK = FileUtilLM.getSDFile() + "/jjdance/download/apk/";
    public static final String DWONLOAD_IMG_PATH = FileUtilLM.getSDFile() + "/jjdance/download/jjdance/";
    public static final String IMG_FOLDER_PATH = JJShopApplication.getContext().getExternalFilesDir(null) + "/jjdance/images/";

    public static final String UPDATE_INVITE_ITEM = "UPDATE_INVITE_ITEM";
    public static final String SIGN_IN_CHECK = "SIGN_IN_CHECK";
    public static final String UPDATE_MY_PROFILE = "UPDATE_MY_PROFILE";
    public static final String UPDATE_DISCOVER = "UPDATE_DISCOVER";
    public static final String UPDATE_MEDIA_LIST = "UPDATE_MEDIA_LIST";
    public static final String VIEW_DOWNLOAD_LIST = "VIEW_DOWNLOAD_LIST";
    public static final String UPDATE_COMMENT_LIST = "UPDATE_COMMENT_LIST";
    public static final String CHANGE_SIZE_TEXT = "CHANGE_SIZE_TEXT";
    public static final String LISTVIEW_TOP = "LISTVIEW_TOP";
    public static final String STOP_REFRESH = "STOP_REFRESH";
    public static final String HOMELIST = "HOMELIST";
    public static final String UPDATE_TEAM = "UPDATE_TEAM";
    public static final String CREATE_TEAM_SUCCESSFUL = "CREATE_TEAM_SUCCESSFUL";
    public static final String UPDATE_MSG_NUM = "UPDATE_MSG_NUM";
    public static final String UPLOADPHOTOSUCCESS = "UPLOAD_PHOTO_SUCCESS";
    public static final int GET_LOCATION = 16;
    public static final int ADDRESS_CODE = 18;
    //请求相机
    public static final int REQUEST_CAPTURE = 100;
    //请求相册
    public static final int REQUEST_PICK = 101;
    //请求截图
    public static final int REQUEST_CROP_PHOTO = 102;

    //分享视频
    public static String SHARE_VIDEO = "http://www.999d.com/m/video/";
    //分享舞队
    public static String SHARE_DANCE_TEAM = "http://www.999d.com/m/user/";

    //同时下载上限
    public static int DOWNLOAD_MAX_COUNT = 6;

    //微信 key
    public static String WECHAT_APP_ID = "wxeff2cdc8550933f3";
    public static String WECHAT_APP_SECRET = "c9c206fc86a95eb60186d327ac4011fc";
    public static String QQ_AUTH = "all";

    //QQ key
    public static String TENCENT_APP_ID = "1105012530";
    public static String TENCENT_APP_KEY = "Ar0JCgXwXXb1nDP4";

    //Mipush key
    public static String MIPUSH_APP_ID = "2882303761517428966";
    public static String MIPUSH_APP_KEY = "5521742812966";

    //Baidu MSSP
    public static String BAIDU_MSSP_APPID = "c6d2b716";
    public static String androidKey = "55165b3aaae43c21e4195f4dc0041f36ce83cea2";

    //每页数据最大个数
    public static int PAGE_SIZE = 20;

    // 登录平台标识
    public static String LOGIN_QQ = "qq";
    public static String LOGIN_WECHAT = "weixin";

    //第三方平台用户登录接口
    public static String HEADER_API_TOKEN_VALUE = "cfa4216923e5a3dccc967804dcfe7a7d";
    public static String OTHER_LOGIN = USER_BASE_URL + "/user/login/plugin";

    public static String COOKIE = "cookie";
    public static String User_Agent = "User-Agent";
//    public static String getCookie(Context mContext){
//        return "_uauth=" + PreUtils.getString(mContext, PreUtils.UAUTH, "") + ";" + PreUtils.getString(mContext, PreUtils.DEVICE, "");
//    }
    public static String getUserAgent(Context context){
        return PreUtils.getString(context,PreUtils.DEVICE,"");
    }

    public static String getCookies(Context context){

        String cookie = PreUtils.getString(context, PreUtils.USER_ID, "")+";"+
//               PreUtils.getString(context,PreUtils.USER_AUTH,"")+";"+
                PreUtils.getString(context,PreUtils.USER_MOBILE,"");
        return cookie;
    }

//    //众萌广告id
//    //应用sid
//    public static final String ZMSID = "e64e3a30";
//    //开屏广告位id
//    public static final String ZMWELCOMEID = "4429661";
//    //横幅广告位id
//    public static final String ZMHFID1 = "4430015";
//    public static final String ZMHFID2 = "4505117";
//    public static final boolean ZMADISTEST = false;
//    //信息流广告位
//    public static final String ZMXXLID = "4680190";
//    //众萌accesstoken
//    public static final String ZMTOKEN = "dHlwZTphY2Nlc3NfdG9rZW4gYWxnOkFFUyA=.YXBwX3BhY2thZ2U6Y29tLmpqZGFuY2UgYXBwX2lkOmU2NGUzYTMwIA==.3dj1iAlb0nnCmxIv3Opj41etWfzSY2Bnd4ICsBCgt6F1A6Dl96FjviAsGzG7H4iAL-pySTerlf7LAjIImNMjjaButaKFhwwTotHrz4FtNSW45vLKn5W77GfNSWudBqQ-";

    //百度广告id
    //开屏页广告
    public static final String BAIDU_WELCOME_ID = "5523543  ";//3369538
    //横幅广告位
    public static final String BAIDU_HF_ID1= "3408198";
    public static final String BAIDU_HF_ID2= "3408216";


    //APK更新检查接口
    public static String APK_UPDATE_CHECK = "http://www.999d.com/api/v1/?m=app";

    //Cookie接口
    public static String COOKIE_REQUEST = USER_BASE_URL + "/user/htmlCreateCookie?login_token=";
    //上传设备信息
    public static String UPLOAD_DEVICE = BASE_URL + "/user/recordDevice";
    //更新用户资料
    public static String USER_UPDATE_PROFILE = USER_BASE_URL + "/user/detail/update";
    //更新用户资料-头像
    public static String USER_UPDATE_PROFILE_AVATAR = USER_BASE_URL + "/user/avatar/update";
    //分类
    public static String CLASSIFY_LIST = USER_BASE_URL + "/cates";
    //用户添加评论接口
    public static String USER_COMMENT_ADD = BASE_URL + "/user/comment/add";
    //用户视频评论列表接口
    public static String USER_COMMENT_LIST = BASE_URL + "/app/comment/getCommentList";
    //用户视频评论点赞接口
    public static String USER_COMMENT_LIKE = USER_BASE_URL + "/user/comment/like";
    //用户删除视频接口
    public static String USER_UPLOAD_VIDEO_DELETE = USER_BASE_URL + "/user/video/delete";
    //用户添加下载接口
    public static String USER_ADD_DOWNLOAD = USER_BASE_URL + "/user/download/add";
    //用户分享统计接口
    public static String SHARE_COUNT = BASE_URL + "/app/share/add";
    //用户关注列表接口
    public static String USER_FOLLOW_LIST = USER_BASE_URL + "/user/follow/list";
    //相关视频推荐
    public static String VIDEO_PAGER_RECOMMEND = BASE_URL + "/app/video/recommendList";
    //用户上传图片接口
    public static String USER_PHOTO_UPLOAD = USER_UPLOAD_URL + "/user/photo/upload";
    //用户图片列表接口
    public static String USER_PHOTO_LIST = USER_BASE_URL + "/user/photo/list";
    //用户删除图片接口
    public static String USER_PHOTO_DELETE = USER_BASE_URL + "/user/photo/delete";
    //精选专题列表
    public static String SPECIAL_LIST = USER_BASE_URL + "/special/list";
    //精选专题详情
    public static String SPECIAL_INFO = USER_BASE_URL + "/special/info";
    //App首屏轮播图接口
    public static String HOME_PROMOTE_LIST = USER_BASE_URL + "/promote/list?type=";
    //明星舞队 -- 更多
    public static String HOME_TEAM_STAR = USER_BASE_URL + "/team/list?sort=recommend";
    //热门舞队 -- 更多
    public static String HOME_TEAM_HOT = USER_BASE_URL + "/team/list?sort=hot";
    //舞曲推荐更多
    public static String DANCE_MUSIC_RECOMMEND_MORE = BASE_URL + "/app/song_album/list?sort=new";
    //舞曲热门更多
    public static String DANCE_MUSIC_HOT_MORE = BASE_URL + "/app/song_album/list?sort=recommend";
    //舞曲热门更多
    public static String VIDEO_MUSIC_LIST = USER_BASE_URL + "/song_album/list?album_id=";
    //舞队详情
    public static String TEAM_DETAIL_INFO = USER_BASE_URL + "/user/info";
    //舞队图片列表
    public static String TEAM_PHOTO_LIST = USER_BASE_URL + "/photo/list?uid=";
    //视频列表
    public static String VIDEO_LIST = USER_BASE_URL + "/video/list";
    //添加关注
    public static String USER_FOLLOW_ADD = USER_BASE_URL + "/user/follow/add";
    //送花
    public static String USER_FLOWER = USER_BASE_URL + "/user/flower";
    //用户添加收藏接口
    public static String USER_COLLECTION_ADD = USER_BASE_URL + "/user/collection/add";
    //用户收藏列表接口
    public static String USER_COLLECTION_LIST = USER_BASE_URL + "/user/collection/list";
    //用户删除收藏接口
    public static String USER_COLLECTION_DELETE = USER_BASE_URL + "/user/collection/delete";
    //用户搜索借口
    public static String SEARCH_LIST = BASE_URL + "/app/search";
    //用户搜索新接口
    //视频
    public static String SEARCH_VIDEO = BASE_URL +"/app/search/video/list";
    //舞队
    public static String SEARCH_DANCETEAM = BASE_URL + "/app/search/team/list";
    //舞曲
    public static String SEARCH_DANCE_MUSIC = BASE_URL + "/app/search/song/list";
    //用户点赞视频接口
    public static String USER_LIKE = USER_BASE_URL + "/user/like";
    //用户点赞视频接口
    public static String USER_FOLLOW_DELETE = USER_BASE_URL + "/user/follow/delete";
    //Video_Album
    public static String VIDEO_ALBUM = USER_BASE_URL + "/video/album?id=";
    //评论删除接口(管理员使用)
    public static String COMMENT_DELETE = USER_BASE_URL + "/admin/deleteComment";
    //名师列表
    public static String TEACH_LIST = BASE_URL + "/app/teacher/getList";
    //名师视频详情
    public static String TEACH_DETIAL = BASE_URL + "/app/teacher";
    //最新视频列表icon
    public static String HOME_NEW_VIDEOLIST = BASE_URL + "/app/video/getNewVideoList";
    //热门视频列表icon
    public static String HOME_HOT_VIDEOLIST = BASE_URL + "/app/video/getHotVideoList";
    //新舞教学视频列表
    public static String HOME_NEWDANCE_TEACH = BASE_URL + "/app/instruct";
    //99课堂视频列表
    public static String HOME_JJ_CLASSROOM = BASE_URL + "/app/jjClassRoom";
    //节目列表
    public static String PROGRAM_LIST = BASE_URL + "/app/program/getList";
    //节目列表详情
    public static String PROGRAM_DETIAL = BASE_URL + "/app/program/detail";
    //节目列表详情翻页
    public static String PROGRAM_DETIAL_PAGE = BASE_URL + "/app/program/detailVideoList";
    //金牌栏目详情页
    public static String HOME_GOLD_DETIAL = BASE_URL + "/app/goldColumn/getHome";
    //金牌栏目翻页
    public static String HOME_GOLD_PAGE = BASE_URL + "/app/goldColumn/getVideoList";
    //首页
//    public static String HOME_LIST = BASE_URL + "/app/home/getList";
    public static String HOME_LIST = BASE_URL + "/app/home/new/getList";
    //视频详情
    public static String VIDEO_PLAY_INFO = BASE_URL + "/app/video/detail";
    //交谊舞列表
    public static String SOCIAL_LIST = BASE_URL + "/app/video/categoryList";
    //意见反馈列表
    public static String FEEDBACK_LIST = BASE_URL + "/app/feedback/getList";
    //意见反馈添加
    public static String FEEDBACK_ADD = BASE_URL + "/app/feedback/add";
    //学跳舞蹈
    public static String ADD_STUDY_DANCE = BASE_URL + "/app/team/addInstruct";
    //创建舞队
    public static String TEAM_CREATE = BASE_URL + "/app/team/createWithInvitation";
    //舞队相册
    public static String TEAM_PHOTOS = BASE_URL + "/app/team/getPhotoList";
    //舞队视频
    public static String TEAM_VIDEOS = BASE_URL + "/app/team/getVideoList";
    //删除舞队视频
    public static String TEAM_DELETE_VIDEO = BASE_URL + "/app/team/removeVideos";
    //删除舞队成员
    public static String TEAM_DELETE_USERS = BASE_URL + "/app/team/removeMembers";
    //删除学跳舞蹈
    public static String TEAM_STUDY_DELETE = BASE_URL + "/app/team/removeInstruct";
    //舞队成员
    public static String TEAM_USERS = BASE_URL + "/app/team/new_getMembers";
    //舞队管理转让
    public static String TEAM_MAKEOVER = BASE_URL + "/app/team/change/captain";
    //舞队管理
    public static String TEAM_UPDATE_INFO = BASE_URL + "/app/team/update";
    //学跳舞蹈
    public static String TEAM_STUDY_DANCE = BASE_URL + "/app/team/getInstructList";
    //搜索舞队
    public static String TEAM_SEARCH_ID = BASE_URL + "/app/team/searchBySn";
    //舞队详情
    public static String TEAM_DETIAL = BASE_URL + "/app/team/detail";
    //舞队详情
    public static String MY_TEAM = BASE_URL + "/app/team/myTeam";
    //舞队解散发送短信
    public static String DISSOLVE_TEAM_SENDSMS = BASE_URL + "/app/team/sendsms";
    //舞队解散校验验证码
    public static String DISSOLVE_VERIFY_SMS = BASE_URL + "/app/team/verifySmsCode";
    //解散舞队
    public static String TEAM_DISSOLVE = BASE_URL + "/app/team/dissolve";
    //申请消息列表
    public static String TEAM_APPLYLIST = BASE_URL + "/app/teamMessage/getApplyList";
    //通过申请
    public static String JOIN_TEAM = BASE_URL + "/app/team/joinTeam";
    //拒绝申请
    public static String APPLY_REFUSE = BASE_URL + "/app/team/applyRefuse";
    //微信发送消息
    public static String WECAHT_SEND_MSG = BASE_URL + "/www/weixin/sendContent";
    //微信群成员列表
    public static String WECHAT_LIST = BASE_URL + "/www/weixin/teamMemberList";
    //微信删除好友
    public static String WECHAT_DEL = BASE_URL + "/www/weixin/deleteTeamMember";
    //舞队上传图片
    public static String TEAM_UPLOAD_IMAGES = BASE_URL + "/app/team/savePhotos";
    //舞队图片删除
    public static String TEAM_DEL_PHOTOS = BASE_URL + "/app/team/delPhotos";
    //退出舞队
    public static String TEAM_OUT = BASE_URL + "/app/team/quit";
    //申请加入舞队
    public static String TEAM_APPLYJOIN = BASE_URL + "/app/team/applyJoin";
    //消息标记已读
    public static String MSG_MARKAPPLYREAD = BASE_URL + "/app/team/markApplyRead";
    //舞队教程地址
    public static String TEAM_TECH_ADDRESS = "http://www.999d.com/index.php?v=show&cid=69&id=934";
    //舞队信息流翻页
    public static String TEAMDETIAL_PAGE = BASE_URL + "/app/teamMessage/getList";
    //我发布的视频
    public static String USER_VIDEO_LIST = BASE_URL + "/app/user/video/list";
    //同步到舞队视频
    public static String SYNC_VIDEO = BASE_URL + "/app/team/addMyVideos";
    //撤销视频同步
    public static String REVOCATION_VIDEO = BASE_URL + "/app/team/removeMyVideos";
    //发现功能列表
    public static String DISCOVERY_LIST = BASE_URL + "/app/discovery/index";
    //系统消息列表
    public static String SYSTEAM_MSGLIST = BASE_URL + "/app/msg/system";
    //视频被点赞
    public static String VIDEO_GOOD = BASE_URL + "/app/msg/praise";
    //评论回复
    public static String COMMENT_REPLY_LIST = BASE_URL + "/app/msg/comment";
    //评论消息已读
    public static String READ_COMMENT_RLP = BASE_URL + "/app/msg/setCommentRead";
    //视频点赞已读
    public static String READ_VIDEO_GOOD = BASE_URL + "/app/msg/setPraiseRead";
    //系统消息已读
    public static String READ_SYSMSG = BASE_URL + "/app/msg/setSystemRead";
    //舞队成就
    public static String TEAM_SUCCESS = BASE_URL + "/app/team/rank/detail";
    //邀请分享
    public static String SHARE_INVITE = "http://user.999d.com/v2/www/team/invite";
    //舞队验证消息
    public static String TEAM_MSG_APPLY = BASE_URL + "/app/team/apply/unread";
    //舞队邀请分享文案
    public static String TEMA_INVITE_SHARE = BASE_URL + "/team/inviteShare";
    //队长教程
    public static String LEADER_MSG = "http://user.999d.com/api/v2/app/team/teamLeaderHelpDesc";
    //队员教程
    public static String USER_MSG = "http://user.999d.com/api/v2/app/team/teamMemberHelpDesc";
    //访客
    public static String TEAM_GUEST = BASE_URL + "/app/team/rank/visitoryList";
    //表演类型
    public static String GET_SHOW_TYPE = BASE_URL + "/app/link/patterns";
    //表演人数
    public static String GET_PEOPLE_NUM = BASE_URL + "/app/link/number";
    //获取视频标题
    public static String GET_VIDEO_TITLE = BASE_URL + "/app/video/getUploadTitle";
    //舞曲搜索
    public static String SEARCH_MUSIC = BASE_URL + "/app/song/search/list";
    //踢除微信群成员
    public static String DELETE_WX_MEMBER = BASE_URL + "/www/weixin/deleteTeamMemberNew";
    //新舞队视频
    public static String NEW_DANCETEAM_VIDEO_LIST = BASE_URL + "/app/team/getVideoNewList";//?team_id=7014&pgoffset=20
    //舞队新相册列表 20170906
    public static String NEW_TEAM_PHOTO_LIST = BASE_URL + "/app/team/getPhotoNewList";//?team_id=7015&pgoffset=20";
    //点击放大查看所有照片
    public static String NEW_TEAM_PHOTO_LOOK_BIG = BASE_URL + "/app/team/viewPhotoList";//?photo_id=5986";
    //查看详情
    public static String NEW_TEAM_PHOTO_DETAIL = BASE_URL + "/app/team/getPhotoDetail";//?photo_id=5986";
    //评论列表
    public static String NEW_TEAM_PHOTO_LIST_PINGLUN = BASE_URL + "/app/team/getPhotoCommentList";//?type=photo&typeid=11852&orderby=hits&pgoffset=20";
    //删除照片
    public static String NEW_TEAM_PHOTO_LIST_DELETE = BASE_URL + "/app/team/deletePhoto";//post id  team_id
    //相册评论
    public static String NEW_TEAM_PHOTO_ITEM_PINGLUN = BASE_URL + "/app/team/addPhotoComment";//post type photo typeid 相册id content 评论内容
    //相册点赞相册点赞post
//    typeid  相册id
//    type   photo  相册点赞   team_guestbook  相册评论点赞
    public static String NEW_TEAM_PHOTO_ITEM_LIKE = BASE_URL + "/app/team/photo/addLike";
    //新相册上传照片
    // photos_url  图片地址，
    // remark   标题
    public static String NEW_TEAM_PHOTO_SAVE_PHOTO = BASE_URL + "/app/team/newSavePhoto";

    //获取视频编辑的背景和片头数据   post   type 1 片头  2 场景
    public static String GET_VIDEO_BG_HEAD = BASE_URL + "/scene/getlist";
    //视频录制获取舞曲 get http://user.i999d.cn:9800/api/v2/app/mv/song/list?pgoffset=10
    public static String VIDEO_MUSIC = BASE_URL + "/app/mv/song/list";
    //获取我们的广告
    public static final String GET_OUR_AD = BASE_URL +  "/app/advert/space?ad_id=1022";
    //获取二维码
    public static final String GET_ERWEIMA = BASE_URL + "/app/team/wechatService/list";
    //用户添加扫描二维码后回调接口
    public static final String ADD_ERWEIMA = BASE_URL + "/app/team/wechatService/auth";


    //音乐播相关
    public static String ACTION_PLAY_MUSIC = "ACTION_PLAY_MUSIC";
    public static String MSG_POINT = "MSG_POINT";
    public static String MSG_POINT_HIDE = "MSG_POINT_HIDE";
    public static String ACTION_STOP_MUSIC = "ACTION_STOP_MUSIC";
    public static String PROGRESS_BAR_VIEW = "PROGRESS_BAR_VIEW";
    public static String PROGRESS_BAR_NUM = "PROGRESS_BAR_NUM";
    public static String CURRENT_TIME = "CURRENT_TIME";
    public static String TOTAL_TIME = "TOTAL_TIME";
    //视频播放相关
    public static String ACTION_PLAY_VIDEO = "ACTION_PLAY_VIDEO";
    public static String ACTION_STOP_VIDEO = "ACTION_STOP_VIDEO";
    public static String COMMENT_REPLY = "COMMENT_REPLY";

    public static String MUSIC_DOWNLOAD_ACTIVITY = "MUSIC_DOWNLOAD_ACTIVITY";//跳转下载舞曲

    public static String BUNDLE_TEAM_ID = "bundle_team_id";
    public static String BUNDLE_TEAM_TITLE = "bundle_team_title";
    public static int TEAM_ID_ERR = -1;

    public static String MOBILE_SWITCH = "mobile_switch";
    public static String DOWNLOAD_SWITCH = "download_switch";

    public static String LOGO_IMAGE = "http://a1.qpic.cn/psb?/V12xBXVp2C5Bcs/dRdk*wBU1jKENl1Vl*AzjE8r2LNxlp2.e0t7*EjrtcI!/b/dCABAAAAAAAA&bo=9AEqAvQBKgIFACM!&rf=viewer_4";

    // 支付广播
    public static final String ACTION_PAY_RESULT = "com.jjdance.action.pay.result";
}
